package top.infopub.enums.bpa;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by wurz on 2021/6/18.
 */
public enum BpaProjectBudgetTypeEnum {
    RZRJ("1", "认质认价"),
    SGTYS("2", "施工图预算"),
    XMBG("3", "项目变更"),
    XMQZ("4", "项目签证"),
    XMSP("5", "项目索赔"),
    XMBC("6", "项目补偿"),
    XMSX("7", "项目甩项"),
    XMCPJ("8", "项目财评价");


    private String code;

    private String name;

    BpaProjectBudgetTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static List<Map<String, String>> asList() {
        List<Map<String, String>> list = new ArrayList<>();
        Map<String, String> map;
        for (BpaProjectBudgetTypeEnum yone : BpaProjectBudgetTypeEnum.values()) {
            map = new HashMap<>();
            map.put("code", yone.getCode());
            map.put("name", yone.getName());
            list.add(map);
        }
        return list;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
